import { defineComponent } from 'vue';
import { showSlot } from '~/src/utils/hooks';
import Style from "./index.module.scss";

export default defineComponent({
    props: {
        /** 是否选中 */
        active: {
            type: Boolean,
            default: false
        }
    },
    setup(props, { slots, attrs }) {

        return () => (<>
            <div class={[Style.but,props.active ? Style.active : '']} {...attrs}>
                {showSlot(slots)}
            </div>
        </>);
    }
})